<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 三栏布局，左右两列定宽，中间列自适应 float+margin*/
        .container{
            height: 40px;
        }

        .left{
            float: left;
            width: 200px;
            background-color: rebeccapurple;
        }
        
        .right{
            float: right;
            width: 200px;
            background-color: blue;
        }
        .center{
            background-color: aqua;
            margin-left: 200px;
            margin-right: 200px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="left">左边</div>  
        <div class="right">右边</div>
        <div class="center">
            <div>
                中间
            ggggggggggggggggg
            ggggggggggggggggggggggggggggdfsdfsgfgfdg
            fdgfg
            </div>
            
        </div>
    </div>
</body>
</html>